import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { hot } from 'react-hot-loader'
import { BrowserRouter as Router, Switch, Redirect, Route, Link } from 'react-router-dom'

import Login from '@page/login/index.jsx'
import NoMatch from '@page/nomatch/index.jsx'
import ManagerWrapper from '@page/manager/index.jsx'

class App extends Component {
    render() {
        return (
            <Router>
                <Switch>
                    <Route path='/login' component={Login} />
                    <Route path='/manager' component={ManagerWrapper} />
                    <Redirect exact from='/' to='/manager' />
                    <Route component={NoMatch} />
                </Switch>
            </Router>
        )
    }
}

hot(module)(App)

ReactDOM.render(<App />, document.getElementById('root'))